Skip to content

[2 of 2] Remove needs_consent_follow_up_requested#6659

Open
murugapl wants to merge 4 commits intohas-refusal-follow-up-requestedfrom
remove-needs-consent-follow-up
Open

[2 of 2] Remove needs_consent_follow_up_requested#6659
murugapl wants to merge 4 commits intohas-refusal-follow-up-requestedfrom
remove-needs-consent-follow-up

Conversation

@murugapl
Copy link
Copy Markdown
Contributor

In 2aac45f, we removed any use of the needs_consent_follow_up_requested sattus, and instead migrated to has_refusal_follow_up_requested. This status can now be completely removed from the code base as all patients should have the new status now.

Jira Issue - MAV-6744

…requested

A parent can only request a follow-up discussion through a consent refusal. Hence, it makes sense for "follow-up requested" to be a substatus of "has a refusal" rather than "needs consent". This commit modifies the code to use has_a_refusal as the parent status. We retain needs_consent_follow_up_requested for now, and can remove it in a future commit when all patients have had their status updated appropriately.
With the post-deploy task all patients with needs_consent_follow_up_requested should be updated to has_a_refusal_follow_up_requested. This means we can hide the checkbox under needs consent till we remove the status altogether in a follow-up PR.
@murugapl murugapl added this to the v8.4.0 milestone Apr 21, 2026
@murugapl murugapl requested a review from a team as a code owner April 21, 2026 14:57
@murugapl murugapl added the data consistency Validations and data tweaks label Apr 21, 2026
The parent status should now be "Has a refusal" not "Needs consent"
def up
Patient::ProgrammeStatus
.where(status: :needs_consent_follow_up_requested)
.where(status: 14)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth just adding a comment here explaining what this value used to represent.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah this was from the other PR, just rebased!

@murugapl murugapl force-pushed the has-refusal-follow-up-requested branch from b5671ac to 3c37a44 Compare April 21, 2026 14:59
In 2aac45f, we removed any use of the needs_consent_follow_up_requested sattus, and instead migrated to has_refusal_follow_up_requested. This status can now be completely removed from the code base as all patients should have the new status now.
@murugapl murugapl force-pushed the remove-needs-consent-follow-up branch from f02f33a to 97178bc Compare April 21, 2026 15:01
@thomasleese thomasleese modified the milestones: v8.4.0, v8.6.0 Apr 23, 2026
@murugapl murugapl force-pushed the has-refusal-follow-up-requested branch 2 times, most recently from 24b1874 to 9767f22 Compare May 6, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data consistency Validations and data tweaks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants